<template>
  <div>
    <!-- 游玩指南 -->
    <!-- mock数据 Splay-->
    <div class="mustgobox">
      <div class="mustgo">
        <div class="up">
          <h5>景区内必去</h5>
          <p>汇集游玩路线+景区必去&gt;</p>
        </div>
        <div class="down">
          <div class="pic" v-for="(v, i) in arr" :key="i">
            <img :src="v.imgsrc" alt="" />
            <p>{{ v.tittle }}</p>
          </div>
        </div>
      </div>
    </div>
    <!-- 灰色条 -->
    <div class="grey"></div>
    <!-- 游玩笔记 -->
    <div class="playnotesbox">
      <div class="playnotes">
        <div class="note">
          <h5>游玩笔记</h5>
          <p @click="fun()">&gt;</p>
        </div>
        <div class="all">
          <p class="up">全部</p>
          <p class="mid">游玩攻略</p>
          <p class="down">实用tips</p>
        </div>
        <!-- 图片mock -->
        <div class="playpicbox">
          <div class="playpic" v-for="(v, i) in arr" :key="i + 1">
            <div>
              <img :src="v.imgsrc2" alt />
              <!-- <p class="ditu">
                <span class="iconfont icon-ditu"></span>
                {{ v.h5 }}
                <span class="line">|</span>
                <span>7.8</span>km
              </p> -->
              <p class="txt">{{ v.p }}</p>
              <div class="headeport">
                <div class="le">
                  <img :src="v.imgsrc" alt />
                  <span>{{ v.p2 }}</span>
                </div>
                <div class="ri">
                  <span class="iconfont icon-dianzan" id="iconfont"></span>
                  <span>2</span>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="notes">
          <p>查看全部网友笔记</p>
          <p>&gt;</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import axios from "axios";
// import { Splay, Splaypic } from "@/api/mayingshaung.js";
export default {
  data() {
    return {
      arr: [],
    };
  },
  mounted() {
    axios.request("http://localhost:8889/Splaypic").then((ok) => {
      console.log(ok);
      this.arr = ok.data;
    });
  },
  methods: {
    fun() {
      this.$router.push("/playnotes");
    },
    fun1() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
}
.mustgobox {
  margin-top: 4.267vw;
  width: 100%;
  .mustgo {
    width: 91.733vw;
    height: 41.067vw;
    margin: auto;
    .up {
      display: flex;
      justify-content: space-between;
      p {
        font-size: 3.467vw;
        color: #b5b5b5;
      }
    }
    .down {
      width: 100%;
      overflow-x: auto;
      margin-top: 4.533vw;
      display: flex;

      // text-align: center;
      .pic {
        width: 36.267vw;
        height: 29.867vw;
        text-align: center;
        margin-right: 1.333vw;
        img {
          width: 36.267vw;
          height: 24vw;
        }
      }
    }
  }
}
.grey {
  width: 100%;
  height: 2.133vw;
  background-color: #f6f6f6;
}
.playnotesbox {
  width: 100%;
  .playnotes {
    width: 91.733vw;
    height: 80vw;
    margin: auto;
    .note {
      display: flex;
      justify-content: space-between;
      margin-top: 5.067vw;
    }
    .all {
      display: flex;
      text-align: center;
      line-height: 7.2vw;
      margin-top: 2.4vw;
      font-size: 2.4vw;
      .up {
        width: 13.333vw;
        height: 7.2vw;
        border-radius: 2.667vw;
        background-color: #ffeee7;
        color: #f68f7e;
        margin-right: 1.333vw;
      }
      .mid {
        width: 25.6vw;
        height: 7.2vw;
        border-radius: 2.667vw;
        background-color: #f6f6f6;
        margin-right: 1.333vw;
      }
      .down {
        width: 20.267vw;
        height: 7.2vw;
        border-radius: 2.667vw;
        background-color: #f6f6f6;
      }
    }
    .notes {
      display: flex;
      justify-content: space-between;
      margin-top: 5.067vw;
      p {
        font-size: 3.2vw;
        color: #565656;
      }
    }
  }
}
.playpicbox {
  width: 100%;
  margin-top: 5.6vw;
  flex-wrap: wrap;
  display: flex;
  .playpic {
    margin: auto;
    // width: 91.733vw;
    // display: flex;
    // flex-wrap: wrap;
    // justify-content: space-between;
    div {
      width: 42.467vw;
      height: 64.8vw;
      position: relative;
      margin-bottom: 2.667vw;
      .ditu {
        position: absolute;
        top: 40.533vw;
        left: 1.867vw;
        color: #f6f6f6;
        .line {
          margin: 0 1.333vw;
        }
      }
      img {
        width: 41.467vw;
        height: 47.2vw;
      }
      .txt {
        width: 46.667vw;
        margin-bottom: 0.8vw;
        text-align: left;
        // overflow-wrap:warp;
      }
      .headeport {
        display: flex;
        justify-content: space-between;
        .le {
          text-align: left;
          img {
            width: 4.533vw;
            height: 4.533vw;
            border-radius: 2.4vw;
          }
          span {
            margin-left: 0.8vw;
            font-size: 2.667vw;
          }
        }
        .ri {
          text-align: right;
          margin-bottom: 4vw;
        }
      }
    }
  }
}
</style>